package com.yjd.bi.jf.enums;

/**
 * Created by chenpengfei on 2017/3/8.
 * 1002：;投资获取积分，1003：兑换商品，2001：积分过期
 */
public enum JfIntegralDataType {
    SIGN(1001,"签到获取积分"),INVEST(1002,"投资获取积分"),EXCHANGE(1003,"兑换商品"),OVERDUE(2001,"积分过期");

    JfIntegralDataType(int code,String label){
        this.code=code;
        this.label=label;
    }

    private int code;
    private String label;

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static JfIntegralDataType getTypeByCode(int code){
        for(JfIntegralDataType t:JfIntegralDataType.values()){
            if(t.getCode()==code){
                return t;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
